package by.ostrovsky.webhousingsystem.dao;

import java.util.List;

import by.ostrovsky.webhousingsystem.dao.implementation.MySQLAccountDAO;
import by.ostrovsky.webhousingsystem.dao.implementation.MySQLEmployeDAO;
import by.ostrovsky.webhousingsystem.dao.implementation.MySQLHousingRequestDAO;
import by.ostrovsky.webhousingsystem.dao.implementation.MySQLProvidedWorkDAO;
import by.ostrovsky.webhousingsystem.dao.implementation.MySQLTaskGroupDAO;
import by.ostrovsky.webhousingsystem.dao.implementation.MySQLWizardDAO;
import by.ostrovsky.webhousingsystem.dao.implementation.MySQLWorkPlanDAO;
import by.ostrovsky.webhousingsystem.dao.implementation.WizardTransactor;
import by.ostrovsky.webhousingsystem.dao.implementation.idao.*;
import by.ostrovsky.webhousingsystem.hibernate.entity.Account;
import by.ostrovsky.webhousingsystem.hibernate.entity.Employee;
import by.ostrovsky.webhousingsystem.hibernate.entity.ProvidedWork;
import by.ostrovsky.webhousingsystem.hibernate.entity.TaskGroup;
import by.ostrovsky.webhousingsystem.hibernate.entity.UserRequest;
import by.ostrovsky.webhousingsystem.hibernate.entity.WorkPlan;

public class MySQLDAOFactory extends DAOFactory {

	@Override
	public IOperateDAO<List<Account>, Boolean> getAccountDAO() {
		return new MySQLAccountDAO();
	}

	@Override
	public IOperateDAO<List<UserRequest>, Boolean> getHousingRequestDAO() {
		return new MySQLHousingRequestDAO();
	}

	@Override
	public IOperateDAO<List<TaskGroup>, Boolean> getTaskGroupDAO() {
		return new MySQLTaskGroupDAO();
	}

	@Override
	public IOperateDAO<List<WorkPlan>, Boolean> getWorkPlanDAO() {
		return new MySQLWorkPlanDAO();
	}

	@Override
	public IOperateDAO<List<Employee>, Boolean> getEmployeDAO() {
		return new MySQLEmployeDAO();
	}

	@Override
	public IReadDAO<Account> getReadAccountDAO() {
		return new MySQLAccountDAO();
	}

	@Override
	public IReadDAO<Employee> getReadEmployeDAO() {
		return new MySQLEmployeDAO();
	}

	@Override
	public IReadDAO<UserRequest> getReadHousingRequestDAO() {
		return new MySQLHousingRequestDAO();
	}

	@Override
	public IReadDAO<TaskGroup> getReadTaskGroupDAO() {
		return new MySQLTaskGroupDAO();
	}

	@Override
	public IReadDAO<WorkPlan> getReadWorkPlanDAO() {
		return new MySQLWorkPlanDAO();
	}

	@Override
	public IOperateDAO<List<ProvidedWork>, Boolean> getProvidedWorkDAO() {
		return new MySQLProvidedWorkDAO();
	}

	@Override
	public IReadDAO<ProvidedWork> getReadProvidedWorkDAO() {
		return new MySQLProvidedWorkDAO();
	}

	@Override
	public IWizardDAO<Employee> getEmployeeWizardDAO(WizardTransactor transactor) {
		return new MySQLWizardDAO<Employee>(transactor);
	}

	@Override
	public IWizardDAO<UserRequest> getHousingRequestWizardDAO(
			WizardTransactor transactor) {
		return new MySQLWizardDAO<UserRequest>(transactor);
	}

	@Override
	public IWizardDAO<WorkPlan> getWorkPlanWizardDAO(WizardTransactor transactor) {
		return new MySQLWizardDAO<WorkPlan>(transactor);
	}

	@Override
	public IWizardDAO<TaskGroup> getTaskGroupWizardDAO(
			WizardTransactor transactor) {
		return new MySQLWizardDAO<TaskGroup>(transactor);
	}
}
